<template>
  <div>
    <cus-modal ref="modal" title="图片" width="780" @onOk="onOk">
      <!-- 预览准备上传的图片列表 -->
      <viewer ref="viewer" :images="imgPreviewUrl.split(',')">
        <img :src="imgPreviewUrl" alt="" style="width: 100%; height: 100%" />
      </viewer>
      <div slot="footer">
      <slot name="footer">
      </slot>
    </div>
    </cus-modal>
  </div>
</template>

<script>
export default {
  name: "imgPreview",
  data() {
    return {
      visible: false,
      imgPreviewUrl: "",
    };
  },
  mounted() {},
  methods: {
    show() {
      // this.$refs["modal"].show = true;
      // 直接显示图片
      const viewer = this.$refs["viewer"].$viewer;
      viewer.show();
    },
    onOk() {},
  },
};
</script>

<style scoped>
</style>

